package com.huhui.myutil.result;

/**
 * @author 胡辉
 * @email iihuhui@163.com
 * @create 2019-07-29 21:28
 */
public class ResponseResult<T> extends Object implements Result<T> {
    private T model;
    private String resultCode;
    private String message;
    private boolean success = true;

    public ResponseResult() {
    }

    public ResponseResult(boolean success) {
        this.success = success;
    }


    public ResponseResult(boolean success, String resultCode, String message) {
        this.success = success;
        this.resultCode = resultCode;
        this.message = message;
    }

    public ResponseResult(String resultCode, String message) {
        this.success = false;
        this.resultCode = resultCode;
        this.message = message;
    }


    public void setSuccess(boolean success) {
        this.success = success;
    }


    public boolean isSuccess() {
        return this.success;
    }


    public void setModel(T model) {
        this.model = model;
    }


    public T getModel() {
        return (T) this.model;
    }


    public String getMessage() {
        return this.message;
    }


    public void setMessage(String message) {
        this.message = message;
    }


    public String getResultCode() {
        return this.resultCode;
    }


    public void setResultCode(String code) {
        this.resultCode = this.resultCode;
    }
}
